﻿SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
GO
CREATE TABLE dbo.bht_PayU_PaymentTransactionPositive
	(
	LogId int NOT NULL IDENTITY (1, 1),
	[Transaction] int NOT NULL,
	LogTime datetime NOT NULL
	)  ON [PRIMARY]
GO
ALTER TABLE dbo.bht_PayU_PaymentTransactionPositive ADD CONSTRAINT
	DF_bht_PayU_PaymentTransactionPositive_LogTime DEFAULT GETDATE() FOR LogTime
GO
ALTER TABLE dbo.bht_PayU_PaymentTransactionPositive ADD CONSTRAINT
	PK_bht_PayU_PaymentTransactionPositive PRIMARY KEY CLUSTERED 
	(
	LogId
	) ON [PRIMARY]

GO
ALTER TABLE dbo.bht_PayU_PaymentTransactionPositive ADD CONSTRAINT
	FK_bht_PayU_PaymentTransactionPositive_bht_PayU_PaymentTransaction FOREIGN KEY
	(
	[Transaction]
	) REFERENCES dbo.bht_PayU_PaymentTransaction
	(
	TransactionId
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	
GO
CREATE PROCEDURE bhp_PayU_PaymentTransactionLogPositive (
	@TransactionId	INT
) 
AS
BEGIN

	INSERT INTO bht_PayU_PaymentTransactionPositive ([Transaction]) VALUES (@TransactionId)

END